<?php
class Dashboard extends CI_Controller {
 
    /**
    * Responsable for auto load the model
    * @return void
    */
    public function __construct(){
        parent::__construct();
        if(!$this->session->userdata('admin'))
            redirect('admin/login');
    }
 
    /**
    * Load the main view with all the current model model's data.
    * @return void
    */
   public function index(){
      //load the view
      $data['main_content'] = 'admin/dashboard';
      $this->load->view('admin/includes/template', $data);  

   }//index

}